const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const collectSchema = new Schema({
    userId: { type: Schema.Types.ObjectId, ref: 'muser' }, // 用户ID，关联到用户表的ID字段
    goodId: { type: Schema.Types.ObjectId, ref: 'good' }, // 商品ID，关联到商品表的ID字段
    createTime: { type: Number, default: Date.now }, // 收藏时间，默认为当前时间
});
const Collect = mongoose.model('collect', collectSchema);
module.exports = Collect;